package fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype;

import java.io.Serializable;

import fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.DangerLevel;
import java.lang.Integer;
import fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.Location;


public final class TemperatureDetectionDataType implements Serializable {
    private static final long serialVersionUID = 0;
  
  public fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.DangerLevel _dataSourceValue_;
  public TemperatureDetectionIndices indices;
  
  public TemperatureDetectionIndices getIndices(){
  	return indices;
  }
  
  public void setIndices(TemperatureDetectionIndices v){
   indices = v;
  }
  
  public fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.DangerLevel getValue(){
  	return _dataSourceValue_;
  }
  
  public void setValue(fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.DangerLevel v){
   _dataSourceValue_ = v;
  }

 public TemperatureDetectionDataType() {
    this._dataSourceValue_ = null;
    this.indices = null;
  }
  
  public TemperatureDetectionDataType(fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.DangerLevel _dataSourceValue_, fr.inria.phoenix.scenario.bwsnfirefighting.framework.datatype.Location location) {
    this._dataSourceValue_ = _dataSourceValue_;
    this.indices = new TemperatureDetectionIndices(location);
  }
  
    @Override
    public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((_dataSourceValue_ == null) ? 0 : _dataSourceValue_.hashCode());
      result = prime * result + ((indices == null) ? 0 : indices.hashCode());

      return result;
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj)
        return true;
      if (obj == null)
        return false;
      if (getClass() != obj.getClass())
        return false;
      TemperatureDetectionDataType other = (TemperatureDetectionDataType) obj;
      if (_dataSourceValue_ == null) {
        if (other._dataSourceValue_ != null)
          return false;
      } else if (!_dataSourceValue_.equals(other._dataSourceValue_))
        return false; 
      if (indices == null) {
        if (other.indices != null)
          return false;
      } else if (!indices.equals(other.indices))
        return false; 

      return true;
    }

}